home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-08-20 | 4.9 KB | 49 lines | [TEXT/CCL ] |
-
- (export (quote (! @ \# $ % ^ & * \( \) _ + - = { } [ ] \: \" \; \' < > ? \, \. / ~ \` \| \\ \:= <= >= /= \¡ \™ \£ \¢ \∞ \§ \¶ \• \ª \º \– \≠ \∑ \´ \® \† \¥ \¨ ^ \π \“ \‘ \∂ \ƒ \© \Δ \¬ \… \Ω \≈ \√ \∫ \µ \≤ \≥ \÷ \« \° \— \± \∏ \” \’ \ \◊ \¿ \» \æ \œ \ç \ø \å \ß \Æ \Œ \Ç \Ø \Å)) :glisp)
-
- (proclaim (quote (special *lisp-readtable*)))
-
- (proclaim (quote (special *glisp-readtable*)))
-
- (proclaim (quote (special *glisp-sexp-readtable*)))
-
- nil
-
- (setf *lisp-readtable* *readtable*)
-
- (setf *glisp-readtable* (copy-readtable nil))
-
- (do (c (&c& (quote (! ? _ & \æ \œ \ç \ø \å \ß \Æ \Œ \Ç \Ø \Å)) (cdr &c&)) glisp::&v) ((atom &c&) glisp::&v) (setq c (car &c&)) (setq glisp::&v (set-syntax-from-char (character c) #\z *glisp-readtable* *lisp-readtable*)))
-
- (do (c (&c& (quote (@ \# $ % ^ * \( \) + - = { } [ ] \: \" \; \' < > \, \. / ~ \` \| \\ \¡ \™ \£ \¢ \∞ \§ \¶ \• \ª \º \– \≠ \∑ \´ \® \† \¥ \¨ ^ \π \“ \‘ \∂ \ƒ \© \Δ \¬ \… \Ω \≈ \√ \∫ \µ \≤ \≥ \÷ \« \° \— \± \∏ \” \’ \ \◊ \¿ \»)) (cdr &c&)) glisp::&v) ((atom &c&) glisp::&v) (setq c (car &c&)) (setq glisp::&v (prog nil (setf (get c (quote delimiter)) t) (cond ((member c (quote (\" ~ \` \\))) (return nil))) (set-syntax-from-char (character c) #\, *glisp-readtable* *lisp-readtable*) (eval (list (quote set-macro-character) (character c) (cons (quote function) (list (cons (quote lambda) (cons (quote (stream char)) (list (cons (quote quote) (list c))))))) nil *glisp-readtable*)))))
-
- (do (c (&c& (list !eof (quote \:=) (quote <=) (quote >=) (quote /=)) (cdr &c&)) glisp::&v) ((atom &c&) glisp::&v) (setq c (car &c&)) (setq glisp::&v (setf (get c (quote delimiter)) t)))
-
- (set-dispatch-macro-character #\# #\$ (function (lambda (stream char x) (list (quote veval) (pvariable (read stream nil !eof t) t)))) *lisp-readtable*)
-
- (set-syntax-from-char #\~ #\; *glisp-readtable* *lisp-readtable*)
-
- (set-macro-character #\` (function (lambda (stream x) (prog nil (unread-char #\` stream) (setf x (lispread stream nil !eof nil)) (cond ((and (consp x) (eq (car x) (quote quote)) (consp (cdr x)) (null (cddr x))) (setf x (cadr x)))) (return x)))) nil *glisp-readtable*)
-
- (set-macro-character #\: (function (lambda (stream char) (cond ((char= (peek-char nil stream nil !eofchar t) #\=) (read-char stream nil !eofchar t) (quote \:=)) (t (quote \:))))) nil *glisp-readtable*)
-
- (set-macro-character #\< (function (lambda (stream char) (cond ((char= (peek-char nil stream nil !eofchar t) #\=) (read-char stream nil !eofchar t) (quote <=)) (t (quote <))))) nil *glisp-readtable*)
-
- (set-macro-character #\> (function (lambda (stream char) (cond ((char= (peek-char nil stream nil !eofchar t) #\=) (read-char stream nil !eofchar t) (quote >=)) (t (quote >))))) nil *glisp-readtable*)
-
- (set-macro-character #\/ (function (lambda (stream char) (cond ((char= (peek-char nil stream nil !eofchar t) #\=) (read-char stream nil !eofchar t) (quote /=)) (t (quote /))))) nil *glisp-readtable*)
-
- (set-macro-character #\^ (function (lambda (stream char) (quote expt))) nil *glisp-readtable*)
-
- (setf *glisp-sexp-readtable* (copy-readtable *glisp-readtable*))
-
- (set-syntax-from-char #\( #\( *glisp-sexp-readtable* *lisp-readtable*)
-
- (set-macro-character #\( (get-macro-character #\( *lisp-readtable*) nil *glisp-sexp-readtable*)
-
- (do (sym (&sym& (quote (+ - * / and or append nconc = /= < <= > >= char< char<= char> char>= char= char-equal char-lessp char-greaterp char/= char-not-equal char-not-lessp char-not-greaterp string< string<= string> string>= string= string-equal string-lessp string-greaterp string/= string-not-equal string-not-lessp string-not-greaterp)) (cdr &sym&)) glisp::&v) ((atom &sym&) glisp::&v) (setq sym (car &sym&)) (setq glisp::&v (setf (get sym (quote associative)) t)))
-
- (do (sym (&sym& (quote (+ - not null atom eval go car caaaar first cdr caaadr second caar caadar third cadr caaddr fourth cdar cadaar fifth cddr cadadr sixth caaar caddar seventh caadr cadddr eight cadar cdaaar ninth caddr cdaadr tenth cdaar cdadar rest cdadr cdaddr cddar cddaar cdddr cddadr cdddar cddddr)) (cdr &sym&)) glisp::&v) ((atom &sym&) glisp::&v) (setq sym (car &sym&)) (setq glisp::&v (setf (get sym (quote prefix)) t)))
-
- (do (l (&l& (quote ((1001 0 \:= set setq setf psetq) (800 850 expt) (700 750 * /) (600 650 + -) (500 550 default) (450 400 cons append revappend nconc nreconc cat concatenate) (300 350 = eq eql equal equalp /= neq neql nequal nequalp < <= > >= char< char<= char> char>= char= char-equal char-lessp char-greaterp char/= char-not-equal char-not-lessp char-not-greaterp string< string<= string> string>= string= string-equal string-lessp string-greaterp string/= string-not-equal string-not-lessp string-not-greaterp) (200 250 and) (100 150 or))) (cdr &l&)) glisp::&v) ((atom &l&) glisp::&v) (setq l (car &l&)) (setq glisp::&v (do (sym (&sym& (cddr l) (cdr &sym&)) glisp::&v) ((atom &sym&) glisp::&v) (setq sym (car &sym&)) (setq glisp::&v (progn (setf (get sym (quote left)) (first l)) (setf (get sym (quote right)) (second l)))))))
-